import 'package:json_annotation/json_annotation.dart';

part 'data.g.dart';

//命令： flutter packages pub run build_runner build
@JsonSerializable()
class Jtdetailinfo {

  int id; //機台id
  int isonline = 0; ////在線状态 0  1
  String name = ""; //機台名稱
  int bjje = 0; //保夾金額
  int toubi_switch = 0; //投幣提示 1 開啟
  int chuhuo_switch = 0; //出貨提示 1 開啟
  int auto_switch = 0; //自動消保 1 開啟
  int time = 0; //消保時間 (分钟)
  int money = 0; //目前币量
  int zdxb = 0; //自動消保金額
  String jt_serial = ""; //機台编号
  int cost = 0; //成本
  String expiration_date = ""; //有效期
  String start_date = ""; //開通日期

  Jtdetailinfo({
    this.id,
    this.isonline,
    this.name,
    this.bjje,
    this.toubi_switch,
    this.chuhuo_switch,
    this.auto_switch,
    this.time,
    this.money,
    this.zdxb,
    this.jt_serial,
    this.cost,
    this.expiration_date,
    this.start_date,
  });

  //反序列化
  factory Jtdetailinfo.fromJson(Map<String, dynamic> json) =>
      _$JtdetailinfoFromJson(json);

  //序列化
  Map<String, dynamic> toJson() => _$JtdetailinfoToJson(this);
}
